﻿#include <QApplication>
#include "view/kdisplayview/kdisplayview.h"
#include "controller/kcalculatorcontroller/kcalculatorcontroller.h"
#include "controller/kinputhandler/kinputhandler.h"
#include "model/kcalculate/kcalculate.h"

int main(int argc, char* argv[])
{
    QApplication app(argc, argv);

    //视图
    DisplayView* view = new DisplayView();
    view->show();

    //模型和连接事件处理
    Calculator model;
    InputHandler* handler = new InputHandler(view);

    //控制器
    CalculatorController* controller = new CalculatorController(view, handler, &model, view);

    int result = app.exec();
    delete view;
    return result;
}
